from django.db import models

# Create your models here.


# 定义图书模型类
class BookInfo(models.Model):

    # 图书名字
    btitle = models.CharField(max_length=20)

    # 图书作者
    bauthor = models.CharField(max_length=20)

    # 书中人物
    bperson = models.CharField(max_length=20)

    # 出版时间
    bpub_date = models.DateField()

    # 阅读量
    bread = models.IntegerField()

    # 评论量
    bcomment = models.IntegerField()

    class Meta:
        db_table = 'tb_book'